{% extends '::admin.html.twig' %} 
{% block title %}
    Администраторская часть
{% endblock %}
{% block javascripts %}
  {{ parent() }}
{% endblock %}
{% block body %}
<h1>Firms creation</h1>

<form action="{{ path('admin_firms_create') }}" method="post" {{ form_enctype(form) }}>
    <div class="form_fieldset">
      {{ form_label(form.name) }}
      {{ form_widget(form.name, {'attr': {'class': 'text' } }) }}
    </div>
    <div class="form_fieldset">
      {{ form_label(form.description) }}
      {{ form_widget(form.description, {'attr': {'class': 'tinymce', 'tinymce': '{"theme":"simple"}' } }) }}
    </div>
    <div class="form_fieldset">
      {{ form_label(form.category) }}
      {{ form_widget(form.category, {'attr': {'class': 'text' } }) }}
      <a href="{{ path('admin_category') }}">Добавить категорию</a>
    </div>
    <div class="form_fieldset">
      {{ form_label(form.user) }}
      {{ form_widget(form.user, {'attr': {'class': 'text' } }) }}
      <a href="{{ path('admin_user_new') }}">Добавить нового пользователя</a>
    </div>
      {{ form_rest(form) }}
    <p>
        <button type="submit">Добавить новую фирму</button>
    </p>
</form>

<ul class="record_actions">
    <li>
        <a href="{{ path('admin_firms') }}">
            Back to the list
        </a>
    </li>
</ul>
{% endblock %}
{% block post_javascripts %}
    {{ parent()}}
    {{ tinymce_init() }}
{% endblock %}